package com.agan.aganalgorithm.titles;

/**
 * @author agan
 * @ClassName DemoDanLie 双重检查单列
 * @Description
 * @Date 2021/3/31 10:06 上午
 **/
public class DemoDanLie {

    private static volatile DemoDanLie demoDanLie=null;

    public static DemoDanLie getInstance(){
        if(demoDanLie == null){
            synchronized (DemoDanLie.class){
                if(demoDanLie == null){
                    demoDanLie = new DemoDanLie();
                }
            }
        }

        return demoDanLie;
    }

}
